class FolderContentsController < ApplicationController
  # GET /folder_contents
  # GET /folder_contents.xml
  def index
    @folder_contents = FolderContent.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @folder_contents }
    end
  end

  # GET /folder_contents/1
  # GET /folder_contents/1.xml
  def show
    @folder_content = FolderContent.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @folder_content }
    end
  end

  # GET /folder_contents/new
  # GET /folder_contents/new.xml
  def new
    @folder_content = FolderContent.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @folder_content }
    end
  end

  # GET /folder_contents/1/edit
  def edit
    @folder_content = FolderContent.find(params[:id])
  end

  # POST /folder_contents
  # POST /folder_contents.xml
  def create
    @folder_content = FolderContent.new(params[:folder_content])

    respond_to do |format|
      if @folder_content.save
        flash[:notice] = 'FolderContent was successfully created.'
        format.html { redirect_to(@folder_content) }
        format.xml  { render :xml => @folder_content, :status => :created, :location => @folder_content }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @folder_content.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /folder_contents/1
  # PUT /folder_contents/1.xml
  def update
    @folder_content = FolderContent.find(params[:id])

    respond_to do |format|
      if @folder_content.update_attributes(params[:folder_content])
        flash[:notice] = 'FolderContent was successfully updated.'
        format.html { redirect_to(@folder_content) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @folder_content.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /folder_contents/1
  # DELETE /folder_contents/1.xml
  def destroy
    @folder_content = FolderContent.find(params[:id])
    @folder_content.destroy

    respond_to do |format|
      format.html { redirect_to(folder_contents_url) }
      format.xml  { head :ok }
    end
  end
end
